package com.molin.IOtest.charstreamTest;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class lianxi01 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        System.out.print("Username: ");
        String username = sc.next();
        System.out.print("Password: ");
        String passwd = sc.next();

        FileWriter fw = new FileWriter("D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\charstreamTest\\a.txt");
        fw.write(username);
        fw.write("\r\n");
        fw.write(passwd);

        fw.flush();
        fw.close();
    }
}
